<div id="info_block" class="bord-1 font-16 backgr-color-white" style="@if($type == 'default') @else display:none;@endif ">
    <div class="color-1 padd-15 boderbottom">企业信息编辑</div>
    <div class="form company-form company-center-form">
        <form id="basicForm">
          <div class="form-group clearfix">
            <div class="col-xs-12 col-sm-3 col-3 ft-16 cor-2">企业名称<small class="color-red">*</small>：</div>
            <div class="col-sm-9 col-xs-12"> 
                <input type="text" class="form-control" name="name" id="checkUname" placeholder="请输入企业名称" value={{!empty($result)?$result->name:''}}>
                <div class="help-block" id="error" style="color:red;"></div>
            </div>
          </div>
         <div class="form-group clearfix">
            <div class="col-xs-12 col-sm-3 col-3 ft-16 cor-2">企业LOGO<small class="color-red">*</small>：</div>
            <div class="col-sm-9 col-xs-12"> 
                <div class="input-group ">
                	<input type="text" name="logo" value="{{empty($result)?'':$result->logo}}" class="form-control" autocomplete="off">
                	<span class="input-group-btn">
                		<button class="btn btn-default" style="height:43px;" type="button" onclick="showImageDialog(this, '{{$opts}}', {{$options}});">选择图片</button>
                	</span>
                </div>
                <div class="input-group " style="margin-top:.5em;margin-left: 0px;">
    				<img src="{{empty($result)?asset('/images/nopic.jpg'):$result->logo}}" onerror="this.src='/images/nopic.jpg'; this.title='图片未找到.'" class="img-responsive img-thumbnail" width="150">
    				<em class="close" style="position:absolute; top: 0px; right: -18px;" title="删除这张图片" onclick="deleteImage(this)">×</em>
    			</div>
            </div>
          </div>
          <div class="form-group clearfix">
            <div class="col-xs-12 col-sm-3 col-3 ft-16 cor-2">所在城市<small class="color-red">*</small>：</div>
            <div class="col-sm-3 col-xs-12"> 
                <select class="form-control" onchange="childAreas(this.value,'areas','city')" name="province" id="province">
                    <option>---选择省份---</option>
                    @foreach($area as $are)
                    <option value="{{$are->area_id}}" @if(!empty($address)) @if($address->province == $are->area_id) selected @endif @endif>{{$are->title}}</option>
                    @endforeach
                </select>
            </div>
            <div class="col-sm-3 col-xs-12"> 
                <select class="form-control" onchange="childAreas(this.value,'areas','area')" name="city" id="city">
                    <option>---选择市---</option>
                    @if($blademode == 'edit')
                    @foreach($subarea as $subare)
                    <option value="{{$subare->area_id}}" @if(!empty($address)) @if($address->city == $subare->area_id) selected @endif @endif>{{$subare->title}}</option>
                    @endforeach
                    @endif
                </select>
            </div>
            <div class="col-sm-3 col-xs-12"> 
                <select class="form-control" name="area" id="area">
                    <option>---选择地区---</option>
                    @if($blademode == 'edit' || (!empty($address) && ($address->area == 0)))
                    @foreach($thrarea as $thrare)
                    <option value="{{$thrare->area_id}}" @if(!empty($address)) @if($address->area == $thrare->area_id) selected @endif @endif>{{$thrare->title}}</option>
                    @endforeach
                    @endif
                </select>
            </div>
          </div>
          <div class="form-group clearfix">
            <div class="col-xs-12 col-sm-3 col-3 ft-16 cor-2">详细地址<small class="color-red">*</small>：</div>
            <div class="col-sm-9 col-xs-12">
                <input type="text" class="form-control" id="address" name="address" placeholder="" value="{{!empty($address)?$address->address:''}}">
            </div>
          </div>
          <div class="form-group clearfix">
            <div class="col-xs-12 col-sm-3 col-3 ft-16 cor-2"></div>
            <div class="col-sm-3">
                <input type="button" class="form-control" onClick="getPoint()" value="获取坐标">
            </div>
            <div class="col-sm-3">
                <input type="text" class="form-control" name="longitude" id="PointLng" placeholder="经度" value="@if(!empty($address)){{ $address->longitude }}@endif">
            </div>
            <div class="col-sm-3">
                <input type="text" class="form-control" name="latitude" id="PointLat" placeholder="纬度" value="@if(!empty($address)){{ $address->latitude }}@endif">
            </div>
          </div>
          <div class="form-group">
                <div class="col-xs-12 col-sm-3 col-3 ft-16 cor-2">公司地图：</div>
                <div class="col-sm-9 col-xs-12">
                    <div id="allmap" style="width:100%;height:380px;border:1px solid #bcbcbc;"></div>
                    <script type="text/javascript">
                        $(function(){
                            bdmap();
                        });
                        function bdmap(){
                           var blademode = $("#blademode").val();
                           var map = new BMap.Map("allmap"); // 创建Map实例
                           if( blademode == 'add'){
                               map.centerAndZoom("南京",11);      // 初始化地图,用城市名设置地图中心点
                           }else{
                              var lng = $("#PointLng").val();
                              var lat = $("#PointLat").val();
                              var point = new BMap.Point(lng,lat);
                              map.centerAndZoom(point, 18);
                              var marker = new BMap.Marker(point);  // 创建标注
                              map.addOverlay(marker);              // 将标注添加到地图中
                           }
                            map.enableScrollWheelZoom();
                            map.enableContinuousZoom();
                            map.addControl(new BMap.NavigationControl());   // 添加平移缩放控件
                            map.addControl(new BMap.ScaleControl());        // 添加比例尺控件
                            map.addControl(new BMap.OverviewMapControl());  //添加缩略地图控件
                            map.addEventListener("click",function(e){       //鼠标单击事件
                                document.getElementById("PointLng").value = e.point.lng;
                                document.getElementById("PointLat").value = e.point.lat;
                            });
                        }
                        function getPoint(){
                            var p = $('#province  option:selected').text();
                            var c = $('#city  option:selected').text();
                            var a = $('#area  option:selected').text();
                            var add = $("#address").val();
                            var address = p + c + a + add;
                            var map = new BMap.Map("allmap");
                            var local = new BMap.LocalSearch(map, {
                                renderOptions:{map: map}
                            });
                            local.search(address);
                            map.addEventListener("click",function(e){
                                document.getElementById("PointLng").value = e.point.lng;
                                document.getElementById("PointLat").value = e.point.lat;
                            });
                        }
                    </script>
                </div>
                <div class="clearfix"></div>
          </div>
          <div class="form-group">
                <div class="col-xs-12 col-sm-3 col-3 ft-16 cor-2">邮编:</div>
                <div class="col-sm-9">
                    <input type="text" class="form-control" name="zip_code" id="zip_code" placeholder="邮编" value="@if(!empty($result)){{ $result->zip_code }}@endif">
                </div>
                <div class="clearfix"></div>
          </div>
          <div class="form-group">
                <div class="col-xs-12 col-sm-3 col-3 ft-16 cor-2">公交路线:</div>
                <div class="col-sm-9">
                    <input type="text" class="form-control" name="bus_route" id="bus_route" placeholder="公交路线" value="@if(!empty($result)){{ $result->bus_route }}@endif">
                </div>
                <div class="clearfix"></div>
          </div>
          <div class="form-group">
                <div class="col-xs-12 col-sm-3 col-3 ft-16 cor-2">公司邮箱:</div>
                <div class="col-sm-9">
                    <input type="email" class="form-control" name="email" placeholder="邮箱" value="@if(!empty($result)){{ $result->email }}@endif">
                </div>
                <div class="clearfix"></div>
          </div> 
          <div class="form-group">
                <div class="col-xs-12 col-sm-3 col-3 ft-16 cor-2">公司手机:</div>
                <div class="col-sm-9">
                    <input type="text" class="form-control" name="phone" placeholder="手机号" value="@if(!empty($result)){{ $result->phone }}@endif">
                </div>
                <div class="clearfix"></div>
          </div> 
          <div class="form-group">
                <div class="col-xs-12 col-sm-3 col-3 ft-16 cor-2">公司电话:</div>
                <div class="col-sm-9">
                    <input type="text" class="form-control" name="tel" id="tel" placeholder="传真" value="@if(!empty($result)){{ $result->tel }}@endif">
                </div>
                <div class="clearfix"></div>
          </div>
          <div class="form-group clearfix">
            <div class="col-xs-12 col-sm-3 col-3 ft-16 cor-2">公司规模<small class="color-red">*</small>：</div>
            <div class="col-sm-9 col-xs-12">
                <select name="scale" id="" class="form-control">
                     @foreach($scales as $scale)
                    <option value="{{ $scale->id }}" @if(!empty($result)) @if($result->scale_id == $scale->id ) selected @endif @endif>{{ $scale->name }}</option>
                    @endforeach
                </select>
            </div>
          </div>
          <div class="form-group clearfix">
            <div class="col-xs-12 col-sm-3 col-3 ft-16 cor-2">所属行业<small class="color-red">*</small>：</div>
            <div class="col-sm-9 col-xs-12">
                @foreach($types as $tp)
                <label class="fl" style="margin-left:10px;">
                    <input type="checkbox" name="ctype[]" value="{{$tp->id}}" @if(!empty($result) && count($result->types)>0) @if(in_array($tp->id,$result->comtype)) checked @endif  @endif >{{$tp->name}}
                </label>
                @endforeach
            </div>
          </div>
          <div class="form-group clearfix">
            <div class="col-xs-12 col-sm-3 col-3 ft-16 cor-2">一句话介绍<small class="color-red">*</small>：</div>
            <div class="col-sm-9 col-xs-12">
                <input type="text" name="signature" class="form-control" value="{{empty($result)?'':$result->signature}}">
            </div>
          </div>
          <div class="form-group clearfix">
            <div class="col-xs-12 col-sm-3 col-3 ft-16 cor-2">公司简介<small class="color-red">*</small>：</div>
            <div class="col-sm-9 col-xs-12">
                <textarea class="form-control content" name="intro">{{empty($result)?'':$result->intro}}</textarea>
            </div>
          </div>
          <div class="form-group clearfix">
            <div class="col-xs-12 col-sm-3 col-3 ft-16 cor-2">公司主页<small class="color-red">*</small>：</div>
            <div class="col-sm-9 col-xs-12">
                <input type="text" name="main_page" class="form-control" value="{{empty($result)?'':$result->main_page}}">
            </div>
          </div>
          {!! csrf_field() !!}
          <input type="hidden" name="apptype" value="company">
          <input type="hidden" name="blademode" id="blademode" value="{{$blademode}}" >
          <input type="hidden" name="add_id" value="@if(!empty($address)){{ $address->add_id }}@endif" >
          <div id="jobs-hots-more" class="padd-t-30 ">
              <button type="button" id="getMoreJobs" class="btn-ok" onclick="saveData('/company/center/company/save','basicForm','')">发布</button>
              <button type="button" id="getMoreJobs" class="btn-cance">取消</button>
          </div>
        </form>
    </div>
</div>